<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <title></title>
    <link type="text/css" rel="stylesheet" href="style.css">
    <!--[if IE]>
    <link type="text/css" rel="stylesheet" href="ie.css">
    <![endif]-->
    <script type="text/javascript" src="jquery-1.4.4.min.js"></script>
    <script type="text/javascript" src="gauge.min.js"></script>
    <script type="text/javascript" src="script.js"></script>
    <script type="text/javascript" src="http://www.java.com/js/deployJava.js"></script>
    <script type="text/javascript">
    var simulate = false;
    var allowDebug = false;
    </script>
</head>
<body class="initializing">
<div class="header">
</div>
<div id="widget">
  <div id="welcome" class="page">
    <div class="info">

    <p>The Network Diagnostic Tool (NDT) provides a sophisticated speed and diagnostic test. An NDT test reports more than just the upload and download speeds &mdash; it also attempts to determine what, if any, problems limited these speeds, differentiating between computer configuration and network infrastructure problems. While the diagnostic messages are most useful for expert users, they can also help novice users by allowing them to provide detailed trouble reports to their network&nbsp;administrator.</p>

    <p>NDT makes use of either Flash or Java plugins to perform the test. Make sure that the plugin you choose is not blocked by your browser</p>

    <div id="warning">
        <p>Selected plugin was not loaded properly. Make sure that you have proper plugin installed, and is not being blocked by your browser.</p>
    </div>

    <div>
      <button id="javaButton" class="backendButton button" onclick="useJavaAsBackend()" type="button">Use Java</button>
      <button id="flashButton" class="backendButton button" onclick="useFlashAsBackend()" type="button">Use Flash</button>
    </div>

    <div is="learn_more">
      <a href="http://software.internet2.edu/ndt/">Learn more about NDT</a> &ndash; <a href="http://www.measurementlab.net/">Learn more about Measurement Lab</a>
    </div>

    </div>
    <div class="status">
      Initializing...
    </div>
    <div class="controls">
      <a href="#test" class="start button">Start Test</a>
    </div>
  </div>
  <div id="test" class="page">
    
    <div id="loading">
      <h2 class="centered">Preparing your tests...</h2>
    </div>
    <div id="upload" class="test">
      <h2 class="centered">Now testing <em>your upload speed</em></h2>
    </div>
    <div id="download" class="test">
      <h2 class="centered">Now testing <em>your download speed</em></h2>      
    </div>

    <canvas id="uploadGauge"></canvas>
    <div id="rtt">RTT
      <div id="rttValue"></div>
    </div>
    <canvas id="downloadGauge"></canvas>

    <div class="locations">
      <div class="local location">
        <div class="name">Your computer</div>
        <div class="address"><?php print $local_ip ?></div>
      </div>
      <div class="remote location">
        <div class="name">Test server</div>
        <div class="address"></div>
      </div>
    </div>

  </div>
  <div id="results" class="summary page">

    <h2>Your test results</h2>

    <div class="view-selector">
      <span class="summary button">Summary</span>
      <span class="details button">Details</span>
      <span class="advanced button">Advanced</span>
    </div>

    <div id="result-pages">

      <div class="result-page summary">

        <div class="upload result">
          <h3>Upload speed</h3>
          <p>
            <span class="number" id="upload-speed">0.00</span>
            <span class="units">mb/s</span>
          </p>
        </div>

        <div class="download result">
          <h3>Download speed</h3>
          <p>
            <span class="number" id="download-speed">0.00</span>
            <span class="units">mb/s</span>
        </div>

        <div class="other">
          <p class="latency"><b>Network latency:</b> <span id="latency">0.0</span> msec round trip time</p>
          <p class="jitter"><b>Jitter:</b> <span id="jitter">0.0</span> msec</p>
        </div>

      </div>

      <div class="result-page details" id="test-details"></div>

      <div class="result-page advanced" id="test-advanced"></div>

    </div>

    <div class="branding">
      <div class="text">
        <a href="http://software.internet2.edu/ndt/" target="_blank">More information about NDT</a> <br />
        <a href="http://measurementlab.net/about" target="_blank">More information about Measurement Lab</a>
      </div>
    </div>

    <div class="controls">
      <a href="#test" class="start button">Test again</a>
    </div>

  </div>
</div>

<div id="backendContainer">
  <!--Use embed tag to have flash client being background for JS UI or applet tag if you want to use java applet instead. -->
  <embed id="NDT" name="NDT" type="application/x-shockwave-flash" src="FlashClt.swf" width="600" height="10" />

  <!--<applet id="NDT" width="600" height="10" name="NDT" code="edu.internet2.ndt.Tcpbw100.class" codebase="<?php print $applet_url ?>" archive="Tcpbw100.jar"     width="400" height="10"></applet>-->
</div>

</body>
</html>

